Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Arc::flipped #367

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Conversation

waywardmonkeys
Copy link
Contributor

No description provided.

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks reasonable; what are the expected use-cases for this?

Copy link
Collaborator

@richard-uk1 richard-uk1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@DJMcNab these kinds of operations can be useful sometimes, for applications other than drawing (when it really doesn't matter what direction the line goes in).

assert_eq!(a.sweep_angle, -f.sweep_angle);

// Flipping it again should result in the original arc
assert_eq!(a, f.flipped());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No fuzzy testing needed, since there is only addition/subtraction meaning perfect accuracy, at least for normal input.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are confirming what I have here is fine, not suggesting a change, right?

@DJMcNab
Copy link
Member

DJMcNab commented Aug 22, 2024

What are the next steps here?

@waywardmonkeys
Copy link
Contributor Author

I am going to land it before the meeting.

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Aug 22, 2024
Merged via the queue into linebender:main with commit c8e9cd2 Aug 22, 2024
15 checks passed
@waywardmonkeys waywardmonkeys deleted the arc-flipped branch August 22, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants